package com.aaa.appiumdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initView();
    }

    private void initView() {
        findViewById(R.id.tap).setOnClickListener((view) -> {
            Toast.makeText(getApplicationContext(), "toast的点击", Toast.LENGTH_SHORT).show();
        });
        findViewById(R.id.long_press).setOnLongClickListener((view) -> {
            Toast.makeText(getApplicationContext(), "toast的长按", Toast.LENGTH_SHORT).show();
            return false;
        });
    }
}
